package com.translate.web.param;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import com.translate.web.constant.ValidateCondtionAndMessage;
import com.translate.web.param.contract.IUserAddParam;

public class UserAddParam implements IUserAddParam {// 名
	// 微信号
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String wxCode;
	// 密码
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.PASSWORD_LEN, message = ValidateCondtionAndMessage.PASSWORD_LEN_MSG)
	private String password;

	// 密码
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String passwordAgin;

	// 真实姓名
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String realname;

	// 手机号
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.PHONE_BY_PATTERN, message = ValidateCondtionAndMessage.PHONE_BY_PATTERN_MSG)
	private String mobile;

	// 邮箱
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.EMAIL_PATTERN, message = ValidateCondtionAndMessage.EMAIL_PATTERN_MSG)
	private String email;

	// 单位
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String organizationCode;

	// 职业身份
	@Min(value = ValidateCondtionAndMessage.MIN_STATUS, message = ValidateCondtionAndMessage.MIN_STATUS_MSG)
	private Byte identity = 0;
	
	
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.NUMBER, message = ValidateCondtionAndMessage.NUMBER_MSG)
	private String code;
	
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String recommendedCode;
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	public String getWxCode() {
		return wxCode;
	}

	public void setWxCode(String wxCode) {
		this.wxCode = wxCode == null ? null : wxCode.trim();
	}

	public String getPassword() {
		return password;
	}

	public String getPasswordAgin() {
		return passwordAgin;
	}

	public void setPasswordAgin(String passwordAgin) {
		this.passwordAgin = passwordAgin;
	}

	public void setPassword(String password) {
		this.password = password == null ? null : password.trim();
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname == null ? null : realname.trim();
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile == null ? null : mobile.trim();
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email == null ? null : email.trim();
	}

	public String getOrganizationCode() {
		return organizationCode;
	}

	public void setOrganizationCode(String organizationCode) {
		this.organizationCode = organizationCode == null ? null : organizationCode.trim();
	}

	@Override
	public Byte getIdentity() {
		// TODO Auto-generated method stub
		return identity;
	}

	@Override
	public void setIdentity(Byte identity) {

		this.identity = identity;
	}

	public String getRecommendedCode() {
		return recommendedCode;
	}

	public void setRecommendedCode(String recommendedCode) {
		this.recommendedCode = recommendedCode;
	}
}